
import 'package:flutterlib/common/config/config.dart';
import 'package:flutterlib/common/net/BaseCodeResponse.dart';
import 'package:flutterlib/model/activity/activity_page_query.dart';
import 'package:flutterlib/model/activity/activity.dart';
import 'package:flutterlib/model/activity/activity_page.dart';
import 'package:flutterlib/model/interest/interest_bean.dart';
import 'package:flutterlib/model/interest/interest_join.dart';
import 'package:flutterlib/model/page_query.dart';
import 'package:flutterlib/model/post/post_bean_page.dart';
import 'package:flutterlib/model/post/post_detail_bean.dart';
import 'package:retrofit/retrofit.dart';
import 'package:dio/dio.dart' hide Headers;

import '../api.dart';

part 'interest_api.g.dart';

@RestApi()
abstract class InterestApi {
  factory InterestApi(Dio dio, {String baseUrl}) = _InterestApi;

  factory InterestApi.builder()=> InterestApi(HttpManager().getDio());


  @GET("/quhui/interest/getMyInterests")
  Future<List<InterestBean>> getMyInterests(@Query("user_id") int userId);

  ///
  /// 暂时不用这个接口，采用配置文件，走sp的形式
  @GET("/quhui/interest/getInterests")
  Future<List<InterestBean>> getInterests();

  @GET("/quhui/interest/getDetailById")
  Future<InterestBean> getDetailById(@Query("id") int id);


  @POST("/quhui/interest/joinInterest")
  Future<bool> joinInterest(@Body() InterestJoin join);
}


